-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use --with-version when configuring jemalloc #77
Conversation
ddbe4b5
to
a743c3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
jemalloc-sys/build.rs
Outdated
@@ -155,6 +155,17 @@ fn main() { | |||
.expect("failed to copy config file to OUT_DIR"); | |||
} | |||
|
|||
// Create a dummy .git file so that 'git describe' fails and | |||
// configure uses the VERSION file we provide. | |||
if let Err(e) = fs::File::create(build_dir.join(".git")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass the version to build script by --with-version=xxx
instead.
Let's skip and delete the VERSION file in configure directory and only use version from CARGO_PKG_VERSION. So it's easier to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. I also updated the metadata part of the version so that still get the same result.
Signed-off-by: Rafael Ávila de Espíndola <[email protected]>
a743c3e
to
21c04c8
Compare
jemalloc-sys/Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "tikv-jemalloc-sys" | |||
version = "0.5.4+5.3.0-patched" | |||
version = "0.5.4+5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the hash has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. Updated.
jemalloc-sys/build.rs
Outdated
let out_dir = PathBuf::from(env::var_os("OUT_DIR").expect("OUT_DIR was not set")); | ||
let src_dir = env::current_dir().expect("failed to get current directory"); | ||
let version = expect_env("CARGO_PKG_VERSION"); | ||
let metadata = version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let metadata = version | |
let je_version = version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
21c04c8
to
b012c86
Compare
jemalloc-sys/Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "tikv-jemalloc-sys" | |||
version = "0.5.4+5.3.0-patched" | |||
version = "0.5.4+5.3.0-0-ge13ca993e8ccb9ba9847cc330696e02839f328f7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = "0.5.4+5.3.0-0-ge13ca993e8ccb9ba9847cc330696e02839f328f7" | |
version = "0.5.4+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
This also changes the metadata of the version so that jemalloc still reports the same version as before. Fixes tikv#76 Signed-off-by: Rafael Ávila de Espíndola <[email protected]>
b012c86
to
f5ac3c0
Compare
Thank you! |
This also changes the metadata of the version so that jemalloc still
reports the same version as before.
Fixes #76